<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ～ ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~{$year} http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------
// you should use `$router`
/* @var think\Route $router */
$router->group('stock', function () use($router) {
    // index 路由
    $router->post('store/index', 'catchAdmin\\stock\\controller\\Store@index');
    //库位列表
    $router->post('warehouseConfig/index', '\\catchAdmin\\stock\\controller\\WarehouseConfig@index');
    //库位添加
    $router->post('warehouseConfig/create', '\\catchAdmin\\stock\\controller\\WarehouseConfig@create');
    //库位编辑
    $router->post('warehouseConfig/update', '\\catchAdmin\\stock\\controller\\WarehouseConfig@update');
    //库位删除
    $router->post('warehouseConfig/delete', '\\catchAdmin\\stock\\controller\\WarehouseConfig@delete');
    // 库存列表
    $router->post('stock/index', '\\catchAdmin\\stock\\controller\\Stock@index');
    //库存添加(一键入库)
    $router->post('stock/create', '\\catchAdmin\\stock\\controller\\Stock@create');
    //库存删除 (取消入库)
    $router->post('stock/delete', '\\catchAdmin\\stock\\controller\\Stock@delete');
    $router->post('stock/statusEdit', '\\catchAdmin\\stock\\controller\\Stock@statusEdit');
    $router->post('stock/batchStatusEdit', '\\catchAdmin\\stock\\controller\\Stock@batchStatusEdit');
    //库存(拆箱)列表
    $router->post('box/index', '\\catchAdmin\\stock\\controller\\Box@index');
    //库存(拆箱)编辑
    $router->post('box/update', '\\catchAdmin\\stock\\controller\\Box@update');
    //库存(拆片)列表
    $router->post('slice/index', '\\catchAdmin\\stock\\controller\\Slice@index');
    //库存(拆片)编辑
    $router->post('slice/update', '\\catchAdmin\\stock\\controller\\Slice@update');
    // 拣货列表
    $router->post('pick/index', '\\catchAdmin\\stock\\controller\\Pick@index');
    // 锁定拣货
    $router->post('pick/create', '\\catchAdmin\\stock\\controller\\Pick@create');
    // 删除锁定
    $router->post('pick/delete', '\\catchAdmin\\stock\\controller\\Pick@delete');
    // 移库列表
    $router->post('move/index', 'catchAdmin\\stock\\controller\\Move@index');
    // 移库创建
    $router->post('move/create', 'catchAdmin\\stock\\controller\\Move@create');
    // 移库修改
    $router->post('move/update', 'catchAdmin\\stock\\controller\\Move@update');
    // 移库删除
    $router->post('move/delete', 'catchAdmin\\stock\\controller\\Move@delete');
    $router->post('move/move', 'catchAdmin\\stock\\controller\\Move@move');
    $router->post('move/moveAll', 'catchAdmin\\stock\\controller\\Move@moveAll');
    // 盘点管理
    // 列表
    $router->post('inventory/index', 'catchAdmin\\stock\\controller\\Inventory@index');
    //新建
    $router->post('inventory/create', 'catchAdmin\\stock\\controller\\Inventory@create');
    //更新
    $router->post('inventory/update', 'catchAdmin\\stock\\controller\\Inventory@update');
    //删除
    $router->post('inventory/delete', 'catchAdmin\\stock\\controller\\Inventory@delete');
    // locking 路由
    $router->post('locking/index', 'catchAdmin\\stock\\controller\\Locking@index');
    $router->post('locking/delete', 'catchAdmin\\stock\\controller\\Locking@delete');
    // moveMain 路由
    $router->post('moveMain/index', 'catchAdmin\\stock\\controller\\MoveMain@index');
    $router->post('moveMain/create', 'catchAdmin\\stock\\controller\\MoveMain@create');

    //库存管理报表列表
    $router->get('inventory/statement', 'catchAdmin\\stock\\controller\\Inventory@statement');
    //库存管理报表明细
    $router->get('inventory/commodityInventory/:id', 'catchAdmin\\stock\\controller\\Inventory@commodityInventory');

    //修改托盘
    $router->post('stock/upTray', 'catchAdmin\\stock\\controller\\Stock@upTray');

})->middleware('auth');
$router->rule('stock/locking/delAll', 'catchAdmin\\stock\\controller\\Locking@delAll', 'POST');
// 无权限的当前库存列表
$router->rule('stock/move/getStock', 'catchAdmin\\stock\\controller\\Move@getStock', 'POST');
// 无权限库位列表
$router->rule('stock/warehouseConfig/getWarehouseConfig', 'catchAdmin\\stock\\controller\\WarehouseConfig@getWarehouseConfig', 'POST');
// 拣货详情
$router->post('stock/pick/indexlist', '\\catchAdmin\\stock\\controller\\Pick@indexlist');
// 盘点明细列表
$router->post('stock/inventory/indexSon', 'catchAdmin\\stock\\controller\\Inventory@indexSon');
// 盘点明细修改
$router->post('stock/inventory/sonUpdate', 'catchAdmin\\stock\\controller\\Inventory@sonUpdate');
//库位信息
$router->post('stock/stock/seatList', '\\catchAdmin\\stock\\controller\\Stock@seatList');
// 库位列表(不加载第三级)
$router->post('stock/warehouseConfig/att', 'catchAdmin\\stock\\controller\\WarehouseConfig@att');
$router->post('stock/warehouseConfig/getSon', 'catchAdmin\\stock\\controller\\WarehouseConfig@getSon');
$router->post('stock/warehouseConfig/loacalConfig', 'catchAdmin\\stock\\controller\\WarehouseConfig@loacalConfig');
$router->post('stock/stock/exportStock', 'catchAdmin\\stock\\controller\\Stock@exportStock');
$router->post('stock/stock/inventory', 'catchAdmin\\stock\\controller\\Stock@inventory');
$router->post('stock/pick/fast', 'catchAdmin\\stock\\controller\\Pick@fast');
//库位列表（加载第三级）
$router->get('stock/warehouseConfig/location', 'catchAdmin\\stock\\controller\\WarehouseConfig@location');
//移库，拆箱件
$router->post('stock/move/split', 'catchAdmin\\stock\\controller\\Move@split');
//移库，库位托盘
$router->get('stock/warehouseConfig/tray/:config_id', 'catchAdmin\\stock\\controller\\WarehouseConfig@tray');

//取消移库--后期加权限
$router->post('/stock/move/cancel', 'catchAdmin\\stock\\controller\\Move@cancel');

//盘点--商品库存

//盘点-报表创建--后期加权限
$router->post('/stock/inventory/statementCreate', 'catchAdmin\\stock\\controller\\Inventory@statementCreate');
//出库--捡货-捡货列表--出库
$router->post('/stock/pick/wholeOut', 'catchAdmin\\stock\\controller\\Pick@wholeOut');
//首页 库存统计，后期加权限
$router->get('/stock/stock/statistics', 'catchAdmin\\stock\\controller\\Stock@statistics');
//后期加权限
$router->post('/stock/warehouseConfig/batch_create', 'catchAdmin\\stock\\controller\\WarehouseConfig@batchCreate');
$router->get('/stock/warehouseConfig/get_warehouse_config_info/:config_id', 'catchAdmin\\stock\\controller\\WarehouseConfig@getWarehouseConfigInfo');
$router->post('/stock/inventory/exportStatement', 'catchAdmin\\stock\\controller\\Inventory@exportStatement');